package com.city.parking;

import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.graphics.Paint;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.widget.CursorAdapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;

import com.city.parking.provider.ParkingProviderHelper;
import com.city.parking.provider.ParkingProviderHelper.Car;
import com.city.parking.util.SharePrefUtil;
import com.city.parking.util.Utils;

public class MoveCarActivity extends FragmentActivity implements OnClickListener {
    private TextView call;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_move_car);
		TextView titleTv = (TextView) findViewById(R.id.nav_title);
		titleTv.setText("欢迎使用APP移车服务");

        ImageView back = (ImageView) findViewById(R.id.nav_ico_back);
        back.setOnClickListener(this);

        ImageView more = (ImageView) findViewById(R.id.nav_ico_more);
        more.setVisibility(View.GONE);

        call = (TextView) findViewById(R.id.contact);
        call.setOnClickListener(this);
        call.getPaint().setFlags(Paint.UNDERLINE_TEXT_FLAG);
    }

    @Override
    public void onClick(View v) {
        // TODO Auto-generated method stub
        switch (v.getId()) {
        case R.id.nav_ico_back:
            finish();
            break;
        case R.id.contact:
            String number = call.getText().toString();

            Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + number));
            startActivity(intent);
            break;
        default:
            break;
        }
    }
}
